<?php

namespace app\admin\controller;

use app\admin\validate\JsonUtils;
use think\facade\View;
use think\Controller;
use think\Db;
use think\db\Where;
use app\admin\model\SysuserModel;
use think\facade\Session;
use auth\Auth;
use think\facade\Config;
use think\facade\Request;
use think\facade\App;

class TestController extends Controller
{
    public function index()
    {
        $o = "data";
//        return JsonHandle::response($o);
//        return JsonHandle::ok($o);  //返回json数据
        return view('index', [
            "data" => JsonUtils::ok($o)
        ]);                   //返回json数据和视图
    }

    function _initialize()
    {

        //查list;
        //import('ORG.Util.Operation');
        //$operation_obj = new \Org\Util\Operation();
        ////$log_list = $operation_obj -> logList(array('member_id' => 2086));
        ////记录日志
        ////$operation_obj -> checkTableIsExist();//创建日志记录表，如果不存在则新建
        //$operation_obj -> writeLog(APP_NAME.'_'.MODULE_NAME .'_'.ACTION_NAME,'系统后台用户登录操作');
    }
}